<template>
  <header class="todo-add">
    <input
      type="checkbox"
      :checked="isAllComplated"
      @change="$emit('toggle-all', $event.target.checked)"
    />
    <input
      type="text"
      v-model.trim="val"
      @keyup.enter="
        $emit('chuan-val', val);
        val = '';
      "
    />
  </header>
</template>

<script>
export default {
  props: ["isAllComplated"],
  data: function () {
    return {
      val: "",
    };
  },
};
</script>

<style>
</style>